package com.wang.dynamic.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wang.dynamic.mapper.UserMapper;
import com.wang.dynamic.model.User;
import com.wang.dynamic.service.IUserService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: wangning1@abupdate.com
 * @date: 2023-12-20 09:21
 **/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @DS("master")
    @Override
    public List<User> listUserBySource1() {
        return baseMapper.selectList(null);
    }

    @DS("slave")
    @Override
    public List<User> listUserBySource2() {
        return baseMapper.selectList(null);
    }
}